<!doctype html>
<html lang="zh" class="no-js">
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.73.0-DEV" />

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">



<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">

<title>Exec 插件示例 | Kustomize</title><meta property="og:title" content="Exec 插件示例" />
<meta property="og:description" content="60 秒在 Linux 构建一个 Exec 插件
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/zh/guides/plugins/execpluginguidedexample/" />
<meta property="article:modified_time" content="2020-07-16T12:57:18-07:00" /><meta property="og:site_name" content="Kustomize" />
<meta itemprop="name" content="Exec 插件示例">
<meta itemprop="description" content="60 秒在 Linux 构建一个 Exec 插件
">
<meta itemprop="dateModified" content="2020-07-16T12:57:18-07:00" />
<meta itemprop="wordCount" content="257">



<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Exec 插件示例"/>
<meta name="twitter:description" content="60 秒在 Linux 构建一个 Exec 插件
"/>





<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">


<script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>



<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />

    <title>Exec 插件示例 | Kustomize</title>
  </head>
  <body class="td-page">
    <header>
      
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
        <a class="navbar-brand" href="/kustomize/zh/">
		<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
	</a>
	<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
		<ul class="navbar-nav mt-2 mt-lg-0">
			
			
			<li class="nav-item mr-4 mb-2 mb-lg-0">
				
				
				
				
				
				
				<a class="nav-link" href="/kustomize/zh/installation/" ><span>安装</span></a>
			</li>
			
			<li class="nav-item mr-4 mb-2 mb-lg-0">
				
				
				
				
				
				
				<a class="nav-link active" href="/kustomize/zh/guides/" ><span class="active">指南</span></a>
			</li>
			
			<li class="nav-item mr-4 mb-2 mb-lg-0">
				
				
				
				
				
				
				<a class="nav-link" href="/kustomize/zh/api-reference/" ><span>API 参考</span></a>
			</li>
			
			<li class="nav-item mr-4 mb-2 mb-lg-0">
				
				
				
				
				<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
			</li>
			
			<li class="nav-item mr-4 mb-2 mb-lg-0">
				
				
				
				
				
				
				<a class="nav-link" href="/kustomize/zh/faq/" ><span>FAQ</span></a>
			</li>
			
			<li class="nav-item mr-4 mb-2 mb-lg-0">
				
				
				
				
				
				
				<a class="nav-link" href="/kustomize/zh/blog/" ><span>博客</span></a>
			</li>
			
			<li class="nav-item mr-4 mb-2 mb-lg-0">
				
				
				
				
				
				
				<a class="nav-link" href="/kustomize/zh/contributing/" ><span>贡献指南</span></a>
			</li>
			
			
			
			<li class="nav-item dropdown d-none d-lg-block">
				

<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	简体中文
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
	
	<a class="dropdown-item" href="/kustomize/guides/plugins/execpluginguidedexample/">English</a>
	
</div>
			</li>
			
		</ul>
	</div>
	<div class="navbar-nav d-none d-lg-block">
</div>
</nav>

    </header>
    <div class="container-fluid td-outer">
      <div class="td-main">
        <div class="row flex-xl-nowrap">
          <div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
            




<div id="td-sidebar-menu" class="td-sidebar__inner">
  
  <form class="td-sidebar__search d-flex align-items-center">
    

    <button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
    </button>
  </form>
  
  <nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
    
    <div class="nav-item dropdown d-block d-lg-none">
      

<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	简体中文
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
	
	<a class="dropdown-item" href="/kustomize/guides/plugins/execpluginguidedexample/">English</a>
	
</div>
    </div>
    
    






<ul class="td-sidebar-nav__section pr-md-3">
  <li class="td-sidebar-nav__section-title">
    <a  href="/kustomize/zh/guides/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">指南</a>
  </li>
  <ul>
    <li class="collapse show" id="kustomizezhguides">
      
      
      
      
      






<ul class="td-sidebar-nav__section pr-md-3">
  <li class="td-sidebar-nav__section-title">
    <a  href="/kustomize/zh/guides/bespoke/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">配置定制（Bespoke configuration）</a>
  </li>
  <ul>
    <li class="collapse " id="kustomizezhguidesbespoke">
      
      
      
    </li>
  </ul>
</ul>

      
      
      
      






<ul class="td-sidebar-nav__section pr-md-3">
  <li class="td-sidebar-nav__section-title">
    <a  href="/kustomize/zh/guides/offtheshelf/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">通用配置（Off-the-shelf configuration）</a>
  </li>
  <ul>
    <li class="collapse " id="kustomizezhguidesofftheshelf">
      
      
      
    </li>
  </ul>
</ul>

      
      
      
      






<ul class="td-sidebar-nav__section pr-md-3">
  <li class="td-sidebar-nav__section-title">
    <a  href="/kustomize/zh/guides/plugins/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Kustomize 插件</a>
  </li>
  <ul>
    <li class="collapse show" id="kustomizezhguidesplugins">
      
      
      
      
      
      
      <a class="td-sidebar-link td-sidebar-link__page " id="m-kustomizezhguidespluginsbuiltins" href="/kustomize/zh/guides/plugins/builtins/">内置插件</a>
      
      
      
      
      
      <a class="td-sidebar-link td-sidebar-link__page  active" id="m-kustomizezhguidespluginsexecpluginguidedexample" href="/kustomize/zh/guides/plugins/execpluginguidedexample/">Exec 插件示例</a>
      
      
      
      
      
      <a class="td-sidebar-link td-sidebar-link__page " id="m-kustomizezhguidespluginsgoplugincaveats" href="/kustomize/zh/guides/plugins/goplugincaveats/">Go 插件注意事项</a>
      
      
      
      
      
      <a class="td-sidebar-link td-sidebar-link__page " id="m-kustomizezhguidespluginsgopluginguidedexample" href="/kustomize/zh/guides/plugins/gopluginguidedexample/">Go 插件示例</a>
      
      
    </li>
  </ul>
</ul>

      
      
    </li>
  </ul>
</ul>

  </nav>
</div>




          </div>
          <div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
            






<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">





<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/zh/guides/plugins/execPluginGuidedExample.md" target="_blank"><i class="fa fa-edit fa-fw"></i> 编辑此页</a>
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=Exec%20%e6%8f%92%e4%bb%b6%e7%a4%ba%e4%be%8b" target="_blank"><i class="fab fa-github fa-fw"></i> 提交文档问题</a>


<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> 提交项目问题</a>

</div>






<nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li></li>
      </ul>
    </li>
    <li><a href="#创建一个工作空间目录">创建一个工作空间/目录</a></li>
    <li><a href="#编写-kustomization">编写 kustomization</a></li>
    <li><a href="#为插件创建目录">为插件创建目录</a></li>
    <li><a href="#编写插件">编写插件</a></li>
    <li><a href="#安装-kustomize">安装 kustomize</a></li>
    <li><a href="#检查目录结构">检查目录结构</a></li>
    <li><a href="#使用插件构建-app">使用插件构建 APP</a></li>
  </ul>
</nav>



          </div>
          <main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
            
  

            <nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
	<ol class="breadcrumb spb-1">
		










<li class="breadcrumb-item" >
	<a href="https://kubernetes-sigs.github.io/kustomize/zh/guides/">指南</a>
</li>




<li class="breadcrumb-item" >
	<a href="https://kubernetes-sigs.github.io/kustomize/zh/guides/plugins/">Kustomize 插件</a>
</li>




<li class="breadcrumb-item active" aria-current="page">
	<a href="https://kubernetes-sigs.github.io/kustomize/zh/guides/plugins/execpluginguidedexample/">Exec 插件示例</a>
</li>

	</ol>
</nav	>

            
<div class="td-content">
	<h1>Exec 插件示例</h1>
	<div class="lead">60 秒在 Linux 构建一个 Exec 插件</div>
	<p>本教程只是一个快速开始的示例，完整的插件文档请看：<a href="..">kustomize 插件</a></p>
<p>本示例将使用 bash 编写了一个简单的 <em>exec</em> 插件，用来生成一个 <code>ConfigMap</code>。</p>
<p>尝试本教程不会破坏你的当前设置。</p>
<h4 id="环境要求">环境要求</h4>
<ul>
<li><code>linux</code></li>
<li><code>git</code></li>
<li><code>curl</code></li>
<li><code>Go 1.13</code></li>
</ul>
<h2 id="创建一个工作空间目录">创建一个工作空间/目录</h2>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#000">DEMO</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#204a87;font-weight:bold">$(</span>mktemp -d<span style="color:#204a87;font-weight:bold">)</span>
</code></pre></div><h2 id="编写-kustomization">编写 kustomization</h2>
<p>新建一个目录来保存所有的配置：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#000">MYAPP</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$DEMO</span>/myapp
mkdir -p <span style="color:#000">$MYAPP</span>
</code></pre></div><p>编写一个 Deployment 配置：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;&#39;EOF&#39; &gt;$MYAPP/deployment.yaml
</span><span style="color:#4e9a06">apiVersion: apps/v1
</span><span style="color:#4e9a06">kind: Deployment
</span><span style="color:#4e9a06">metadata:
</span><span style="color:#4e9a06">  name: the-deployment
</span><span style="color:#4e9a06">spec:
</span><span style="color:#4e9a06">  replicas: 3
</span><span style="color:#4e9a06">  template:
</span><span style="color:#4e9a06">    spec:
</span><span style="color:#4e9a06">      containers:
</span><span style="color:#4e9a06">      - name: the-container
</span><span style="color:#4e9a06">        image: monopole/hello:1
</span><span style="color:#4e9a06">        command: [&#34;/hello&#34;,
</span><span style="color:#4e9a06">                  &#34;--port=8080&#34;,
</span><span style="color:#4e9a06">                  &#34;--date=$(THE_DATE)&#34;,
</span><span style="color:#4e9a06">                  &#34;--enableRiskyFeature=$(ENABLE_RISKY)&#34;]
</span><span style="color:#4e9a06">        ports:
</span><span style="color:#4e9a06">        - containerPort: 8080
</span><span style="color:#4e9a06">        env:
</span><span style="color:#4e9a06">        - name: THE_DATE
</span><span style="color:#4e9a06">          valueFrom:
</span><span style="color:#4e9a06">            configMapKeyRef:
</span><span style="color:#4e9a06">              name: the-map
</span><span style="color:#4e9a06">              key: today
</span><span style="color:#4e9a06">        - name: ALT_GREETING
</span><span style="color:#4e9a06">          valueFrom:
</span><span style="color:#4e9a06">            configMapKeyRef:
</span><span style="color:#4e9a06">              name: the-map
</span><span style="color:#4e9a06">              key: altGreeting
</span><span style="color:#4e9a06">        - name: ENABLE_RISKY
</span><span style="color:#4e9a06">          valueFrom:
</span><span style="color:#4e9a06">            configMapKeyRef:
</span><span style="color:#4e9a06">              name: the-map
</span><span style="color:#4e9a06">              key: enableRisky
</span><span style="color:#4e9a06">EOF</span>
</code></pre></div><p>编写一个 service 配置：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt;$MYAPP/service.yaml
</span><span style="color:#4e9a06">kind: Service
</span><span style="color:#4e9a06">apiVersion: v1
</span><span style="color:#4e9a06">metadata:
</span><span style="color:#4e9a06">  name: the-service
</span><span style="color:#4e9a06">spec:
</span><span style="color:#4e9a06">  type: LoadBalancer
</span><span style="color:#4e9a06">  ports:
</span><span style="color:#4e9a06">  - protocol: TCP
</span><span style="color:#4e9a06">    port: 8666
</span><span style="color:#4e9a06">    targetPort: 8080
</span><span style="color:#4e9a06">EOF</span>
</code></pre></div><p>现在为您要编写的插件创建一个配置文件。</p>
<p>这个配置文件的内容也是 k8s 资源对象。其中 <code>apiVersion</code> 和 <code>kind</code> 字段的值用于在文件系统中查找插件代码（稍后会对此进行更多介绍）。</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;&#39;EOF&#39; &gt;$MYAPP/cmGenerator.yaml
</span><span style="color:#4e9a06">apiVersion: myDevOpsTeam
</span><span style="color:#4e9a06">kind: SillyConfigMapGenerator
</span><span style="color:#4e9a06">metadata:
</span><span style="color:#4e9a06">  name: whatever
</span><span style="color:#4e9a06">argsOneLiner: Bienvenue true
</span><span style="color:#4e9a06">EOF</span>
</code></pre></div><p>最后在 kustomization 文件中引用以上所有内容：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;EOF &gt;$MYAPP/kustomization.yaml
</span><span style="color:#4e9a06">commonLabels:
</span><span style="color:#4e9a06">  app: hello
</span><span style="color:#4e9a06">resources:
</span><span style="color:#4e9a06">- deployment.yaml
</span><span style="color:#4e9a06">- service.yaml
</span><span style="color:#4e9a06">generators:
</span><span style="color:#4e9a06">- cmGenerator.yaml
</span><span style="color:#4e9a06">EOF</span>
</code></pre></div><p>检查这些文件</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">ls -C1 <span style="color:#000">$MYAPP</span>
</code></pre></div><h2 id="为插件创建目录">为插件创建目录</h2>
<p>插件必须位于特定的目录，以便 Kustomize 能够找到它们。</p>
<p>该示例将使用临时目录：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#000">PLUGIN_ROOT</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$DEMO</span>/kustomize/plugin
</code></pre></div><p>在上面定义的插件配置 <code>$MYAPP/cmGenerator.yaml</code> 中指定：</p>
<blockquote>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>myDevOpsTeam<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SillyConfigMapGenerator<span style="color:#f8f8f8;text-decoration:underline">
</span></code></pre></div></blockquote>
<p>这意味着该插件必须位于以下目录中：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#000">MY_PLUGIN_DIR</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$PLUGIN_ROOT</span>/myDevOpsTeam/sillyconfigmapgenerator

mkdir -p <span style="color:#000">$MY_PLUGIN_DIR</span>
</code></pre></div><p>插件的目录结构为： <code>apiVersion 的 value/小写 kind 的 value</code>。</p>
<p>插件拥有自己的目录，不但可以保存插件代码，还可以保存测试代码以需要的补充数据文件。</p>
<h2 id="编写插件">编写插件</h2>
<p>插件有 <em>exec</em> 和 <em>Go</em> 两种.</p>
<p>编写一个 <em>exec</em> 插件，将其安装到正确的目录，文件名必须与插件的类型匹配（在本例中为 <code>SillyConfigMapGenerator</code>）：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cat <span style="color:#4e9a06">&lt;&lt;&#39;EOF&#39; &gt;$MY_PLUGIN_DIR/SillyConfigMapGenerator
</span><span style="color:#4e9a06">#!/bin/bash
</span><span style="color:#4e9a06"># Skip the config file name argument.
</span><span style="color:#4e9a06">shift
</span><span style="color:#4e9a06">today=`date +%F`
</span><span style="color:#4e9a06">echo &#34;
</span><span style="color:#4e9a06">kind: ConfigMap
</span><span style="color:#4e9a06">apiVersion: v1
</span><span style="color:#4e9a06">metadata:
</span><span style="color:#4e9a06">  name: the-map
</span><span style="color:#4e9a06">data:
</span><span style="color:#4e9a06">  today: $today
</span><span style="color:#4e9a06">  altGreeting: &#34;$1&#34;
</span><span style="color:#4e9a06">  enableRisky: &#34;$2&#34;
</span><span style="color:#4e9a06">&#34;
</span><span style="color:#4e9a06">EOF</span>
</code></pre></div><p>根据定义，<em>exec</em> 插件必须是可执行的：</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">chmod a+x <span style="color:#000">$MY_PLUGIN_DIR</span>/SillyConfigMapGenerator
</code></pre></div><h2 id="安装-kustomize">安装 kustomize</h2>
<p>根据<a href="/kustomize/zh/installation">文档</a>安装 kustomize:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">curl -s <span style="color:#4e9a06">&#34;https://raw.githubusercontent.com/\
</span><span style="color:#4e9a06">kubernetes-sigs/kustomize/master/hack/install_kustomize.sh&#34;</span>  <span style="color:#000;font-weight:bold">|</span> bash
mkdir -p <span style="color:#000">$DEMO</span>/bin
mv kustomize <span style="color:#000">$DEMO</span>/bin
</code></pre></div><h2 id="检查目录结构">检查目录结构</h2>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">tree <span style="color:#000">$DEMO</span>
</code></pre></div><h2 id="使用插件构建-app">使用插件构建 APP</h2>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#000">XDG_CONFIG_HOME</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">$DEMO</span> <span style="color:#000">$DEMO</span>/bin/kustomize build --enable_alpha_plugins <span style="color:#000">$MYAPP</span>
</code></pre></div><p>之前如果您已经设置了 <code>PLUGIN_ROOT=$HOME/.config/kustomize/plugin</code>，则无需在 <em>kustomize</em> 命令前使用 <code>XDG_CONFIG_HOME</code>。</p>

	
	
	<div class="text-muted mt-5 pt-3 border-top">最后修改 2020年07月16日: <a  href="https://github.com/kubernetes-sigs/kustomize/commit/f9ee578aed600136133c3232fff03029cdfc526e">Docs: Auto-fix markdownlint issues (f9ee578a)</a>
</div>
</div>


          </main>
        </div>
      </div>
      
<footer class="bg-dark py-5 row d-print-none">
  <div class="container-fluid mx-sm-5">
    <div class="row">
      <div class="col-6 col-sm-4 text-xs-center order-sm-2">
        
        
        
<ul class="list-inline mb-0">
  
  <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
    <a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
      <i class="fa fa-envelope"></i>
    </a>
  </li>
  
</ul>

        
        
      </div>
      <div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
        
        
        
<ul class="list-inline mb-0">
  
  <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
    <a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
      <i class="fab fa-github"></i>
    </a>
  </li>
  
</ul>

        
        
      </div>
      <div class="col-12 col-sm-4 text-center py-2 order-sm-2">
        <small class="text-white">&copy; 2020 Kubernetes Authors All Rights Reserved</small>
        
	
		
	
      </div>
    </div>
  </div>
</footer>


    </div>
    
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>







<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>



<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>


  </body>
</html>